﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Jifen.master" AutoEventWireup="true" CodeFile="Lottery.aspx.cs" Inherits="SY.WebSite.Web.Jifen.Lottery" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>历史拍卖 - 素币系统 - <%= Settings.Title %></title>
    <link href="<%= Settings.StaticFileDomain %>/Scripts/util/jquery-pagination/lib/jquery_pagination/pagination.css" rel="stylesheet" type="text/css" />
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/template/trimpath-template.js" type="text/javascript"></script>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/util/jquery-pagination/lib/jquery_pagination/jquery.pagination.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="Server">
    <dl class="tabs">
        <dd class="active"><a href="javascript:void(0);" onclick="page.list(0,0,this);">全部</a></dd>
        <dd class=""><a href="javascript:void(0);" onclick="page.list(1,0,this);">进行中</a></dd>
        <dd class=""><a href="javascript:void(0);" onclick="page.list(3,0,this);">我参与过的</a></dd>
        <dd class=""><a href="javascript:void(0);" onclick="page.list(2,0,this);">已经结束</a></dd>
    </dl>
    <div id="result"></div>
    <div id="pagination"></div>
        
    <textarea name="auctionlist" id="auctionlist" style="display:none;">       
        {for l in list}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel tuan_detail_main">
                        <div class="tuan_detail_main">
						    <h1 class="c_tx2"><a href="LotteryOpen.aspx?id=@{l.Id}" target="_blank">@{l.Title}</a></h1>
					        <div class="details_bar clearfix">
						        <div class="tuan_details_info">
							        <div class="tuan_details_box">
								        <div class="details_buy">
									        <div class="price_all">
										        <p class="price">
											        <span class="original_price">超 <strong>@{l.LimitAmount}素币</strong>可参与抽奖</span>
										        </p>
										        <p class="discount_price"><span class="num_price">@{l.CostAmount}</span>素币</p>
									        </div>
									        <p id="buy_button_a@{l.Id}" class="btns_buy {if l.Status == 1} end {elseif l.OpenTime.ToDate() < new Date()} {if l.UserId != page.currentUser.userId } begin {/if} {elseif l.Participants.indexOf(","+page.currentUser.userId+",") >= 0} print {elseif page.currentUser.available< l.LimitAmount} disable {else} lottery {/if}">
										        <a href="javascript:;" {if l.Status ==0 && l.OpenTime.ToDate() > new Date() && l.Participants.indexOf(","+page.currentUser.userId+",") == -1 && page.currentUser.available>= l.LimitAmount} onclick='page.join(@{l.Id}, @{l.CostAmount})' {/if} {if l.Status == 0 && l.OpenTime.ToDate() < new Date() && l.UserId == page.currentUser.userId} onclick='page.open(@{l.Id})' {/if} >
											        <span>&nbsp;</span>
										        </a>
									        </p>
								        </div>
								        <div class="tuan_result">
									        <p class="tuan_result_status"><span id="participantCount@{l.Id}">@{page.joinCount(l.Participants)}</span>&nbsp;人参与</p>
									        <div class="tuan_item">
										        <strong class="end" id="time_title">@{l.OpenTime.ToDate().Format('yyyy年MM月dd日 hh:mm')}结束</strong>
									        </div>
								        </div>
							        </div>
						        </div>
						        <div class="tuan_details_photo">
							        <div class="banner_large">
								        <ol class="banner_content">
									        <li id="showDetailPhoto"><img alt="@{l.Title}" title="@{l.Title}" src="@{l.Image}" /></li>
								        </ol>
							        </div>
						        </div>
						        <strong class="tuan_details_filter"></strong>
					        </div>
                            {if l.WinnerId>0}
                            <p><strong>中奖者：@{l.Winner}</strong></p>
                            {/if}
				        </div>
                    </div>
                </div>
            </div>
        {forelse}
            <div class="row">
                <div class="twelve columns">
                    <div class="panel">
                        <p>暂无抽奖 :-)</p>
                    </div>
                </div>
            </div>
        {/for}
    </textarea>
    <script src="<%= Settings.StaticFileDomain %>/Scripts/page/jifen/lottery.js" type="text/javascript"></script>
</asp:Content>